package com.hades.example.java.refactoring.after.c11.c11_10_form_template_method;

public class HtmlStatement extends Statement {
    @Override
    String headerString(Customer customer) {
        return "<H1>Rentals for <EM>" + customer.getName() + "</EM></H1><P>\n";
    }

    @Override
    String eachRentalString(Rental each) {
        return each.getMovie().getTitle() + ": " + each.getCharge() + "<BR>\n";
    }

    @Override
    String footerString(Customer customer) {
        return "<P>You owe <EM>" + customer.getTotalCharge() + "</EM><P>\n"
                + "On this rental you earned <EM>" + customer.getTotalFrequentRenterPoints() + "</EM> frequent renter points<P>";
    }
}
